/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef __PROPERTY_WINDOW_H__
#define __PROPERTY_WINDOW_H__

#include "ComponentControl.h"
#include "RenderSettingControl.h"

namespace PQBuilder
{
	class PropertyWindow : 
		public WidgetBase
	{
	public:
		static const int PREFER_WIDTH=260;
	public:
		PropertyWindow(QWidget *parent = 0);
		~PropertyWindow();

		//
		void OnComponentAttached(PQEngine::Component* component);
		void OnComponentDetached(PQEngine::Component* component);
		void OnGameObjectSelected(PQEngine::GameObject *object);
		void OnGameObjectDeselected(PQEngine::GameObject *object);
		
		void OnRenderPropertySelected();

	private:
		void removeAllComponentsUI();
	private:
		QToolBox* _toolBox;
		RenderSettingControl* _renderControl;//global control that one scene can only own one

		QVector<ComponentControl*> _controls;
		
		int _maxHeight;
	};
}

#endif
